home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-11 / klipdial.zip / DIALIT.DOC < prev    next >
Text File  |  1993-01-04  |  5KB  |  155 lines

  1.  
  2.  
  3.  
  4.  
  5.              This program is adapted from
  6.  
  7.                       DTR and AT
  8.                           by
  9.             Donavon Kuhn  &  Jon Niedfeldt
  10.                        (c) 1985
  11.  
  12.                 Adaptation for Clipper
  13.                           by
  14.                       John Karns
  15.  
  16.                Clipper/Modem Interface
  17.  
  18.                      CLIPDIAL.ASM
  19.  
  20.                 v1.0  10/26/88
  21.  
  22.  
  23.       In general terms:
  24.                           Call DIALIT with "Hayes command"
  25.                     where the hayes command is a character string
  26.                     without the AT on the front.  (Since all commands
  27.                     start with an AT, the module will supply it).
  28.  
  29.                     COM1 is the default unless you specify otherwise.
  30.  
  31.  
  32.       Specifically:
  33.  
  34.         Call DIALIT with "Com2:DT1234567"  && Can use COM1 thru 4
  35.  
  36.         Call DIALIT with "DT1234567"       && Dial # 1234567 (default COM1)
  37.  
  38.         Call DIALIT with "H"               && Hang up
  39.  
  40.         (Upper or lower case may be used.)
  41.  
  42.       =========================================================================
  43.  
  44.      Example:
  45.  
  46.             m_PHONE = SPACE(10)
  47.             CLEAR
  48.             @ 10, 25 SAY "Enter Phone No. " GET m_phone PICTURE "@R (999) 999-9999"
  49.             READ
  50.             prefix = "DT"
  51.             cmd = prefix + m_phone
  52.             @ 12, 25 SAY "Dialing - Please wait..."
  53.             Errcode = DIALIT(cmd)
  54.  
  55.             prompt1 = "Return Code = " + ltrim(str(errcode))
  56.             @ 14, 25 SAY prompt1
  57.             @ 23, 25 SAY "Press any key to hang up..."
  58.             inkey(0)
  59.             cmd = "H"
  60.             Errcode = DIALIT(cmd)   && Must use this form to maintain consis-
  61.                                             &&   tency with above function call...
  62.  
  63. *          CALL DIALIT with cmd  && This will cause Clipper to generate a
  64.                                             &&   compile-time error (see note below).
  65.  
  66.             CLEAR
  67.             @ 12, 35 SAY "All Done..."
  68.  
  69.             return
  70.  
  71.  
  72.           This module may be called as a procedure or as a function.
  73.           If called as a function, an error code will be returned.
  74.  
  75.  
  76.       For example:
  77.           Errcode = DIALIT("DT1234567")
  78.  
  79.  
  80.         where:
  81.           Errcode = 0 - No errors detected
  82.  
  83.                 1 - Specified Com port > 4
  84.  
  85.                 2 - Com port not found
  86.  
  87.  
  88. ┌───────────────────────────────────────────────────────────────────────────┐
  89. │  NOTE: If you call it as BOTH a function and as a procedure, Clipper      │
  90. │        will give the compile-time error "Symbol Redefinition Error",      │
  91. │        so you must be consistent - i.e., use one form or the other!       │
  92. └───────────────────────────────────────────────────────────────────────────┘
  93.  
  94.  
  95. This is a straight-forward adaptation of the above mentioned set of
  96. programs.  A modem which uses the standard hayes command set is
  97. required.
  98.  
  99.  
  100. The two sets of modules, DIALIT86.* and DIALIT87.* are for Clipper
  101. versions Autumn '86 and Summer '87 respectively.
  102.  
  103.  
  104. The intended purpose of the module is to provide a convenient
  105. interface between a Clipper application and a dialing device.  It
  106. should be fully possible to send any of the full set of "AT"
  107. commands to a modem via DIALIT.  The full command string would be
  108.  
  109.                   Call DIALIT with "COMx:command"
  110.  
  111.                         where:  1 <= x <= 4
  112.  
  113. and 'command' is any modem command. The AT prefix IS SUPPLIED by
  114. DIALIT, so don't use it!  Just start with the third character in the
  115. string.  So instead of ATDT---------  use  DT-----------, get it?
  116. The COM spec. is optional, defaulting to COM1.
  117.  
  118.  
  119. Before attempting this adaptation, I searched many of the popular
  120. Clipper/dBase BBS's for such a utility.  I did find one in a shareware
  121. library, but then I came upon the two programs, AT.COM and DTR.COM
  122. which were written to function from DOS, and were contributed freely
  123. by the authors for others to use for their own purposes.  I likewise am
  124. happy to make a small contribution in that same spirit of sharing
  125. with the user/programmer community.
  126.  
  127.  
  128. This is my first (successful) attempt at doing anything with
  129. 808x/80x86 assembler, particularly relating to Clipper.  I think I
  130. learned a few basics in working in both domains, and hope to do some
  131. more in the future.  It is great fun!  But I make no claims toward being
  132. an expert in assembler.  You are free to make your own adjustments as
  133. you see fit.
  134.  
  135.  
  136. When called from Clipper, DIALIT will set DTR before dialing.
  137.  
  138.      For the uninitiated, DTR is a mnemonic for Data
  139.      Terminal Ready.  It must be set prior to sending the
  140.      dial string in order for the modem to dial out.
  141.      "Dropping DTR" will effectively hang up the modem, and
  142.      can override a frozen connection - i.e., it FORCES the
  143.      modem to go on-hook (Hang up).
  144.  
  145. I thought it best to leave DTR set in order not to disrupt any other
  146. pending process.
  147.  
  148.  
  149.                                   DISCLAIMER
  150.  
  151. These programs are provided as is.  Whomsoever will use these will
  152. assume all responsibility in determining that these programs modules
  153. are suitable for any intended use.  Clipper is a trademark of
  154. Nantucket Corporation.
  155.